-
Notifications
You must be signed in to change notification settings - Fork 42
fix(core): Disable release creation and source maps upload in dev mode #666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -274,7 +279,7 @@ export function sentryUnpluginFactory({ | |||
"Release injection disabled via `release.inject` option. Will not inject release." | |||
); | |||
} else if (!options.release.name) { | |||
logger.warn( | |||
logger.debug( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also took the liberty to relax the log level here. Releases aren't required anymore for debugId-based upload and I've seen build logs this and the log below were added (in fact multiple times due to multi-build-setups of meta frameworks like SvelteKit and Nuxt)
Some more context on the Unplugin union-types the |
@@ -106,7 +111,7 @@ export function sentryUnpluginFactory({ | |||
|
|||
const options = normalizeUserOptions(userOptions); | |||
|
|||
if (unpluginMetaContext.watchMode || options.disable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is technically not the goal of this PR but thinking about this logic more holistically we probably don't want to disable the entire plugin for dev mode because we have other things that may be valuable in dev mode, like react component annotations or tree shaking utilities (I guess for debugging purposes).
Should we limit this check to just anything that has a side-effect/is invoking Sentry CLI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, we can adjust this further. I think what we want to disable is release management and sourcemaps upload, right? release and debugId injection should be fine in dev as well, right?
process.env.NODE_ENV
| datasource | package | from | to | | ---------- | ------------------- | ----- | ----- | | npm | @sentry/vite-plugin | 3.1.0 | 3.1.1 | ## [v3.1.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#311) - fix(core): Disable release creation and source maps upload in dev mode ([#666](getsentry/sentry-javascript-bundler-plugins#666)) This fix disables any external calls to the Sentry API for managing releases or uploading source maps, when detecting that the plugin is running in dev-mode. While this rarely actually happened, it also polluted the dev server output with unnecessary logs about missing auth tokens, which shouldn't be required in dev mode.
| datasource | package | from | to | | ---------- | ------------------- | ----- | ----- | | npm | @sentry/vite-plugin | 3.1.0 | 3.1.1 | ## [v3.1.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#311) - fix(core): Disable release creation and source maps upload in dev mode ([#666](getsentry/sentry-javascript-bundler-plugins#666)) This fix disables any external calls to the Sentry API for managing releases or uploading source maps, when detecting that the plugin is running in dev-mode. While this rarely actually happened, it also polluted the dev server output with unnecessary logs about missing auth tokens, which shouldn't be required in dev mode.
| datasource | package | from | to | | ---------- | ------------------- | ----- | ----- | | npm | @sentry/vite-plugin | 3.1.0 | 3.1.2 | ## [v3.1.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#312) - deps: Bump `@sentry/cli` to `2.41.1` ([#671](getsentry/sentry-javascript-bundler-plugins#671)) ## [v3.1.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#311) - fix(core): Disable release creation and source maps upload in dev mode ([#666](getsentry/sentry-javascript-bundler-plugins#666)) This fix disables any external calls to the Sentry API for managing releases or uploading source maps, when detecting that the plugin is running in dev-mode. While this rarely actually happened, it also polluted the dev server output with unnecessary logs about missing auth tokens, which shouldn't be required in dev mode.
| datasource | package | from | to | | ---------- | ------------------- | ----- | ----- | | npm | @sentry/vite-plugin | 3.1.0 | 3.1.2 | ## [v3.1.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#312) - deps: Bump `@sentry/cli` to `2.41.1` ([#671](getsentry/sentry-javascript-bundler-plugins#671)) ## [v3.1.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#311) - fix(core): Disable release creation and source maps upload in dev mode ([#666](getsentry/sentry-javascript-bundler-plugins#666)) This fix disables any external calls to the Sentry API for managing releases or uploading source maps, when detecting that the plugin is running in dev-mode. While this rarely actually happened, it also polluted the dev server output with unnecessary logs about missing auth tokens, which shouldn't be required in dev mode.
| datasource | package | from | to | | ---------- | ------------------- | ----- | ----- | | npm | @sentry/vite-plugin | 3.1.0 | 3.1.2 | ## [v3.1.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#312) - deps: Bump `@sentry/cli` to `2.41.1` ([#671](getsentry/sentry-javascript-bundler-plugins#671)) ## [v3.1.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#311) - fix(core): Disable release creation and source maps upload in dev mode ([#666](getsentry/sentry-javascript-bundler-plugins#666)) This fix disables any external calls to the Sentry API for managing releases or uploading source maps, when detecting that the plugin is running in dev-mode. While this rarely actually happened, it also polluted the dev server output with unnecessary logs about missing auth tokens, which shouldn't be required in dev mode.
| datasource | package | from | to | | ---------- | ------------------- | ----- | ----- | | npm | @sentry/vite-plugin | 3.1.0 | 3.1.2 | ## [v3.1.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#312) - deps: Bump `@sentry/cli` to `2.41.1` ([#671](getsentry/sentry-javascript-bundler-plugins#671)) ## [v3.1.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#311) - fix(core): Disable release creation and source maps upload in dev mode ([#666](getsentry/sentry-javascript-bundler-plugins#666)) This fix disables any external calls to the Sentry API for managing releases or uploading source maps, when detecting that the plugin is running in dev-mode. While this rarely actually happened, it also polluted the dev server output with unnecessary logs about missing auth tokens, which shouldn't be required in dev mode.
perfect PR id 😈
This PR
watchmode
flag in theory but not in practise, we'd always return the actual plugins.writeBundle
hook usually not being called in dev. But, most importantly alsocloses #344
probably also closes #520 (I'll leave a reply to get confirmation)